Skip to content

Support single child in InputGroup (#714) - #724

Open
bedrich-schindler wants to merge 1 commit into
masterfrom
task/714
Open

Support single child in InputGroup (#714)#724
bedrich-schindler wants to merge 1 commit into
masterfrom
task/714

Conversation

@bedrich-schindler

Copy link
Copy Markdown
Contributor

InputGroup crashed when a single child was passed because it called children.reduce() directly, assuming an array. Normalize children with React.Children.toArray() before resolving the validation state.

Cover the children prop with visual tests for both a single node and multiple nodes, and make InputGroupForTest accept custom children while keeping the current composition as the default.

`InputGroup` crashed when a single child was passed because it called
`children.reduce()` directly, assuming an array. Normalize `children`
with `React.Children.toArray()` before resolving the validation state.

Cover the `children` prop with visual tests for both a single node and
multiple nodes, and make `InputGroupForTest` accept custom `children`
while keeping the current composition as the default.
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://react-ui-org.github.io/react-ui/pr-preview/pr-724/

Built to branch gh-pages at 2026-08-11 12:42 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants